<template>
	<view class="find-brand">
		<view class="list">
			<view class="item" v-for="item in brandList" :key="item.id">
				<image class="img" :src="item.bigPic" mode=""></image>
				<view class="text-holder">
					<view class="title">
						{{item.name}}
					</view>
					<view class="text">
						{{item.brandStory}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		requestBrandList
	} from 'api/find/find.js';

	export default {
		data() {
			return {
				brandList: [],
				info: {
					start: 0,
					limit: 5,
				}
			}
		},
		methods: {
			getBrandList() {
				requestBrandList(this.info).then(res => {
					console.log(res);
					this.brandList = res.data.rows;
				})
			}
		},
		created() {
			this.getBrandList();
		}
	}
</script>

<style lang="scss">
	.find-brand {
		.list {
			box-sizing: border-box;
			width: 100%;
			padding: 0 30rpx;

			.item {
				margin: 20rpx 0;
				overflow: hidden;
				border-radius: 10rpx;
				background-color: #fff;
				height: 620rpx;

				.img {
					width: 100%;
					height: 480rpx;
				}

				.text-holder {
					padding: 30rpx;
					font-size: 48rpx;
					line-height: 78rpx;

					.title {
						font-size: 32rpx;
						line-height: 44rpx;
						color: #3e3e3e;
						font-weight: bold;
					}

					.text {
						font-size: 11px;
						color: #b1b1b1;
						line-height: 15px;
						white-space: nowrap;
						overflow: hidden;
					}
				}
			}
		}
	}
</style>
